Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install ipfs as a normal extension #2328

Merged
merged 7 commits into from
Apr 24, 2019
Merged

Install ipfs as a normal extension #2328

merged 7 commits into from
Apr 24, 2019

Conversation

yrliou
Copy link
Member

@yrliou yrliou commented Apr 24, 2019

Fix brave/brave-browser#3950
Fix brave/brave-browser#4218

Instead of installing as a component extension, this PR installs ipfs companion using a webstore installer so manifest could be localized and the extension option page could be shown normally under brave://extensions.

Toggle on the switch would prompt to install IPFS companion extension if it was't installed before. If already installed, it will enable the extension.
Toggle off the switch would disable IPFS companion extension (but not uninstall it). To fully remove (uninstall) the IPFS companion extension after it is installed, remove the extension through brave://extensions.

Submitter Checklist:

Test Plan:

  1. Visit brave://settings and toggle IPFS companion switch, a prompt as below will be shown if IPFS companion extension is not currently installed.

Screen Shot 2019-04-24 at 8 18 15 AM

  1. Click "Cancel" in the prompt, the IPFS companion switch should be changed back to off.

  2. Toggle it on again, and click "Add extension" in the prompt to install it, IPFS companion extension should now be installed and enabled.

  3. Right click IPFS companion switch icon to open options page, it should shown as

Screen Shot 2019-04-24 at 8 25 58 AM

  1. In brave://settings, toggle IPFS companion switch off again and visit brave://extensions, IPFS companion extension should be shown disabled.

  2. Enable the IPFS companion switch toggle in brave://settings again, IPFS companion extension should be shown enabled in brave://extensions.

  3. Remove IPFS companion extension in brave://extensions, IPFS companion extension switch toggle in brave://settings should be shown off.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@yrliou yrliou added this to the 0.66.x - Nightly milestone Apr 24, 2019
@yrliou yrliou self-assigned this Apr 24, 2019
@yrliou yrliou changed the title Install ipfs as extension Install ipfs as a normal extension Apr 24, 2019
@yrliou yrliou requested review from emerick and removed request for emerick April 24, 2019 05:11
@yrliou yrliou requested a review from emerick April 24, 2019 11:53
emerick
emerick previously approved these changes Apr 24, 2019
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just had a couple minor comments.

@@ -83,6 +85,15 @@ void BraveDefaultExtensionsHandler::SetHangoutsEnabled(
}
}

bool BraveDefaultExtensionsHandler::IsExtensionInstalled(
const std::string extension_id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you probably want const std::string& here?

@@ -25,6 +25,8 @@ class BraveDefaultExtensionsHandler : public settings::SettingsPageUIHandler {
void SetHangoutsEnabled(const base::ListValue* args);
void SetIPFSCompanionEnabled(const base::ListValue* args);

bool IsExtensionInstalled(const std::string extension_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be a const method?

Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented May 3, 2019

@yrliou Step 5: Toggle IPFS off again - do you mean off the IPFS from below popup? If so, after making IPFS off, IPFS companion extension is NOT disabled in brave://extensions. Can you please clarify the point 5 in the above test plan? Thanks!

image

@yrliou
Copy link
Member Author

yrliou commented May 6, 2019

@GeetaSarvadnya No, it is not the option page but the switch we introduced in brave://settings. I've updated step 5 to be more clear, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipfs companion options page cannot be shown Extension name missing for IPFS
3 participants